import request from '@/utils/request'
import { downFile } from '@/utils/request'

/**
 * 设备配置分页查询
 * @param {查询条件} data
 */
export function listGbMConfig(query) {
  return request({
    url: 'Buss/GbMConfig/list',
    method: 'get',
    params: query,
  })
}

/**
 * 新增设备配置
 * @param data
 */
export function addGbMConfig(data) {
  return request({
    url: 'Buss/GbMConfig',
    method: 'post',
    data: data,
  })
}
/**
 * 修改设备配置
 * @param data
 */
export function updateGbMConfig(data) {
  return request({
    url: 'Buss/GbMConfig',
    method: 'PUT',
    data: data,
  })
}
/**
 * 获取设备配置详情
 * @param {Id}
 */
export function getGbMConfig(id) {
  return request({
    url: 'Buss/GbMConfig/' + id,
    method: 'get'
  })
}

/**
 * 删除设备配置
 * @param {主键} pid
 */
export function delGbMConfig(pid) {
  return request({
    url: 'Buss/GbMConfig/delete/' + pid,
    method: 'POST'
  })
}
// 导出设备配置
export async function exportGbMConfig(query) {
  await downFile('Buss/GbMConfig/export', { ...query })
}
